<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<script src="vue.js"></script>
<body>

    <div id="app">
        <li v-for=" (v,k) in comments" >
            {{v.content}} <button @click="remove(k)">删除</button>
        </li>

    </div>

<script>
    var app=new Vue({
        el:'#app',
        data: {
            search_comment:'',
            current_content:'',
            comments:[
                {id:2,content:'前端申'},
                {id:3,content:'后端君'},
                {id:1,content:'走丽水'},
            ]
        },
        methods:{
            remove(k){
              this.comments.splice(k,1);
            },


            },


    });

</script>
</body>
</html>